<template>
  <open-modal :openModal='showOffaccountQr' @closeModal='closeQr'>
    <article class="c-bg-white c-br-tl10 c-br-tr10">
      <div class="c-textAlign-c c-p">
        <div class="c-fs28 c-fc-xblack c-pt36 c-pb36 c-fw-b c-ph80">{{title}}</div>
        <i @click="closeQr" class="iconfont icon-buoumaotubiao20  c-fs34 c-fc-sgray c-pa c-p-t0 c-p-r0 c-ph24 c-pv24"></i>
      </div>
      <div v-if="isFromGroupCode" class="c-fs24 c-w100 c-textAlign-c c-fc-gray c-mb30">
        如果您无法入群，可尝试<span class="c-fc-lblue" @click="refresh">刷新</span>
      </div>
      <div class="c-flex-column c-aligni-center c-justify-center">
        <div class="c-textAlign-c c-minh360 c-ph20  c-br8">
          <img class="c-ww380" :src="officialAccountQrCode" />
        </div>
        <div class="c-textAlign-c c-w100 c-ph24 c-pb24 c-pt10 c-fs24 c-fc-xblack">
          {{ btText }}
        </div>
      </div>
    </article>

  </open-modal>
</template>

<script>
import OpenModal from "@/components/templates/common/openModal.vue";
export default {
  components:{
    OpenModal
  },

  props:{
    title:{
      type:String,
      default:'公众号二维码',
    },
     showOffaccountQr: {
      type: Boolean,
      default: false
    },
    officialAccountQrCode:{
      type:String,
      default:'',
    },
    btText: {
      type:String,
      default:'长按识别关注公众号',
    },
    isFromGroupCode: {
      type: Boolean,
      default: false
    },
  },

  data() {
    return {

    }
  },

  created() {},

  methods:{
    refresh() {
      this.$emit('refresh')
    },
    closeQr() {
       this.$emit('update:showOffaccountQr', false)
    },
  },

}
</script>

<style scoped>

</style>